package com.bite.lesson1;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.DirectoryIteratorException;

public class Demo_01 {
    public static void main(String[] args) throws IOException {
        File file1 = new File("D:/GAO/Test/Demo_01");
        File file2 = new File("D:/GAO/Test");
        File file3 = new File("D:/GAO/Test/Demo_03.mp3");
        File file4 = new File("D:/GAO/Test/Demo_04.jpg");

        System.out.println("是否存在："+ file1.exists());
        System.out.println("是否为目录：" + file1.isDirectory());
        System.out.println("是否存在："+ file2.exists());
        System.out.println("是否为目录：" + file2.isDirectory());
        file3.createNewFile();
        file4.createNewFile();

        File file5 = new File("D:/GAO/Test/Demo_05");
        file5.mkdir();
        InputStream inputStream = new FileInputStream("D:/GAO/Test/Demo_05");
    }
}
